package cn.tedu.charging.device.mapper;

import cn.tedu.charging.common.pojo.po.ChargingGunInfoPO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface GunMapper extends BaseMapper<ChargingGunInfoPO> {
    @Select("select cgi.* from charging_gun_info cgi left join charging_pile_info cpi on cpi.id=cgi.pile_id " +
            "left join charging_station cs on cs.id=cpi.station_id where cs.id=#{id} ")
    List<ChargingGunInfoPO> selectByStationId(Integer id);
}
